export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './user/Login',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/welcome',
    name: 'home',
    icon: 'home',
    component: './Welcome',
  },
  {
    name: 'resources',
    path: '/resources',
    icon: 'appstore',
    component: './Resources',
  },
  {
    name: '资源详情',
    path: '/rd',
    component: './ResourceDetail',
    hideInMenu: true,
  },
  {
    name: 'addResource',
    path: '/addResource',
    icon: 'to-top',
    component: './AddResource',
  },
  {
    name: 'adminResource',
    access: 'canAdmin',
    path: '/admin',
    component: './Admin',
  },
  {
    // 用户个人信息界面
    path: '/userInfo',
    name: 'account',
    icon: 'user',
    routes: [
      {
        path: '/userInfo',
        redirect: '/userInfo/info',
      },
      {
        path: '/userInfo/info',
        name: '个人信息',
        icon: 'user',
        component: './user/Info',
      },
      {
        path: '/userInfo/like',
        name: '资源收藏',
        icon: 'heart',
        component: './user/Like',
      },
      {
        path: '/userInfo/recommend',
        name: '推荐记录',
        icon: 'folder',
        component: './user/Recommend',
      },
    ],
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
